<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// 
//  fetch.php
//  www.6block.com
//  
//  Created by Will_Lee on 2011-06-02.
//  Copyright 2011 lishuzu. All rights reserved.
// 
/*
*抓取数据
*/
class fetch extends CI_Controller {

	 function __construct()
	 {
		parent::__construct();
		$this->load->database();
	 }

	 function vipshop()
	 {

		//设置不超时，关闭浏览器继续执行
		ignore_user_abort(true);
		set_time_limit(0);
		$this->load->model('admin/vipshop_model', '', TRUE);
		$result = $this->vipshop_model->fetch();
		if ($result) {
			echo '统计成功'.date('Y-m-d H:i:s', now());
		}else {
			echo '统计失败'.date('Y-m-d H:i:s', now());
		}
	 }
	
	 function ihush()
	 {

		//设置不超时，关闭浏览器继续执行
		ignore_user_abort(true);
		set_time_limit(0);
		$this->load->model('admin/ihush_model', '', TRUE);
		$result = $this->ihush_model->fetch();
		if ($result) {
			echo '统计成功'.date('Y-m-d H:i:s', now());
		}else {
			echo '统计失败'.date('Y-m-d H:i:s', now());
		}
	 }
}
?>